package com.kl.modular.system.service.api;

import com.kl.common.pager.PageParameter;
import com.kl.common.pager.Pager;
import com.kl.modular.system.dao.bo.SystemAuthResourceBo;
import com.kl.modular.system.dao.model.SystemAuthResource;
import com.kl.modular.system.service.vo.SystemAuthResourceVO;

import java.util.List;

/**
 * 权限资源service业务接口
 * @author XRP_ZJB
 * @date 2016-01-15 13:41
 * @(C) XIGNSOFT Copyright 
 */
public interface ISystemAuthResourceService {
	
	/**
	 * 权限资源 列表 分页
	 */	
	public Pager<SystemAuthResource> getListByBo(SystemAuthResourceBo systemAuthResourceBo, PageParameter pageParameter);
	
	/**
	 * 查询记录数
	 * @param systemAuthResourceBo
	 * @return
	 */
	public int selectCountByBo(SystemAuthResourceBo systemAuthResourceBo);
	
	/**
	 * 权限资源 列表
	 */
	public List<SystemAuthResource> getListAllByBo(SystemAuthResourceBo systemAuthResourceBo, PageParameter pageParameter);
	
	/**
	 * 添加权限资源
	 */
	public void addSystemAuthResource(SystemAuthResource systemAuthResource) throws Exception;
	
	/**
	 * 更新权限资源
	 */
	public void updateByCode(SystemAuthResource systemAuthResource) throws Exception;
	
	/**
	 * 删除权限资源
	 */
	public void deleteByCodes(String[] codes) throws Exception;
	
	/**
	 * 获取权限资源
	 */
	public SystemAuthResource getSystemAuthResourceByCode(String code);
	
	/**
	 * 查询模块下权限信息
	 * @param code
	 * @return
	 */
	public SystemAuthResourceVO getSystemAuthResourceVOByModularCode(String code, String roleShiroCode, String roleCodes)throws Exception;

	/**
	 * 查询公安下模块信息
	 * @param code
	 * @param personId
	 * @return
	 * @throws Exception
	 */
	public SystemAuthResourceVO getSystemAuthResourceVoForSec(String code, Long personId) throws Exception;

	/**
	 * 模块下一级菜单
	 * @param modularCode
	 * @return
	 * @throws Exception
	 */
	public List<SystemAuthResource> getSystemAuthResourceOneByModularCode(String modularCode, String roleShiroCode, String roleCodes) throws Exception;
	
	/**
	 * 模块下二级菜单
	 * @param menuCode
	 * @return
	 * @throws Exception
	 */
	public List<SystemAuthResource> getSystemAuthResourceTwoByModularCode(String menuCode, String roleShiroCode, String roleCodes) throws Exception;
	
	/**
	 * 查询角色授权字符串
	 * @param roleCode
	 * @return
	 */
	public List<String> getRoleAuthListByRoleCode(String roleCode, String moduleType);

	/**
	 * 查询机关人员权限
	 * @param organsPersonId
	 * @return
	 */
	List<String> getAuthResourceByOrgansPersonId(Long organsPersonId);

	/**
	 * 获取机关人员模块
	 * @param organsPersonId
	 * @return
	 */
	List<SystemAuthResource> getMenuListByOrgansPersonId(Long organsPersonId);
}